<template>
  <div>
  <el-form :inline="true" :model="formInline" class="demo-form-inline">
  <el-form-item label="姓名">
    <el-input v-model="formInline.user" placeholder="请选择姓名"></el-input>
  </el-form-item>
  <el-form-item label="地址">
    <el-select v-model="formInline.region" placeholder="请选择地址">
      <el-option label="上海市普陀区金沙江路 1518 弄" value="shanghai"></el-option>
      <el-option label="上海市普陀区金沙江路 1517 弄" value="beijing"></el-option>
      <el-option label="上海市普陀区金沙江路 1516 弄" value="shanghai"></el-option>
      <el-option label="上海市普陀区金沙江路 1519 弄" value="beijing"></el-option>
    </el-select>
  </el-form-item>
  <el-form-item label="日期">
    <el-col :span="11">
      <el-date-picker type="date" placeholder="选择日期" v-model="sizeForm.date1" ></el-date-picker>
    </el-col>
    
    
  </el-form-item>
  <el-form-item>
    <el-button type="primary" @click="onSubmit" size="mini" style="background:#409eff ; border:#409eff " >查询</el-button>
    <el-button type="primary" @click="onSubmit" size="mini" style="background: #DCDFE6;  border:#606266; color:#606266;">重置</el-button>
  </el-form-item>
</el-form>
  <el-table
    :data="tableData"
    border
    style="width: 100%"
    :header-cell-style="{ background: '#409eff', color: '#000000' }">
    <el-table-column
      prop="date"
      label="日期"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="180">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址">
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        <el-button
          size="mini"
          type="danger"
          @click="handleDelete(scope.$index, scope.row)">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</div>
</template>

<script>
  export default {
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王六',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '张三',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '李四',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        formInline: {
          user: '',
          region: ''
        },
        sizeForm: {

          date1: '',
        }
      }
    },
    methods: {
      handleEdit(index, row) {
        console.log(index, row);
      },
      handleDelete(index, row) {
        console.log(index, row);
      },
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>